<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GSocketConnectable</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="GIO 参考手册">
<link rel="up" href="resolver.html" title="DNS resolution">
<link rel="prev" href="gio-GProxyResolver.html" title="GProxyResolver">
<link rel="next" href="gio-GNetworkAddress.html" title="GNetworkAddress">
<meta name="generator" content="GTK-Doc V1.17 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="gio-GProxyResolver.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="resolver.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GIO 参考手册</th>
<td><a accesskey="n" href="gio-GNetworkAddress.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#gio-GSocketConnectable.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#gio-GSocketConnectable.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="gio-GSocketConnectable"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gio-GSocketConnectable.top_of_page"></a>GSocketConnectable</span></h2>
<p>GSocketConnectable — Interface for potential socket endpoints</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="gio-GSocketConnectable.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">                    <a class="link" href="gio-GSocketConnectable.html#GSocketConnectable" title="GSocketConnectable">GSocketConnectable</a>;
struct              <a class="link" href="gio-GSocketConnectable.html#GSocketConnectableIface" title="struct GSocketConnectableIface">GSocketConnectableIface</a>;
<a class="link" href="gio-GSocketConnectable.html#GSocketAddressEnumerator" title="GSocketAddressEnumerator"><span class="returnvalue">GSocketAddressEnumerator</span></a> * <a class="link" href="gio-GSocketConnectable.html#g-socket-connectable-enumerate" title="g_socket_connectable_enumerate ()">g_socket_connectable_enumerate</a>
                                                        (<em class="parameter"><code><a class="link" href="gio-GSocketConnectable.html#GSocketConnectable" title="GSocketConnectable"><span class="type">GSocketConnectable</span></a> *connectable</code></em>);
<a class="link" href="gio-GSocketConnectable.html#GSocketAddressEnumerator" title="GSocketAddressEnumerator"><span class="returnvalue">GSocketAddressEnumerator</span></a> * <a class="link" href="gio-GSocketConnectable.html#g-socket-connectable-proxy-enumerate" title="g_socket_connectable_proxy_enumerate ()">g_socket_connectable_proxy_enumerate</a>
                                                        (<em class="parameter"><code><a class="link" href="gio-GSocketConnectable.html#GSocketConnectable" title="GSocketConnectable"><span class="type">GSocketConnectable</span></a> *connectable</code></em>);

                    <a class="link" href="gio-GSocketConnectable.html#GSocketAddressEnumerator" title="GSocketAddressEnumerator">GSocketAddressEnumerator</a>;
<a class="link" href="gio-GSocketAddress.html#GSocketAddress" title="GSocketAddress"><span class="returnvalue">GSocketAddress</span></a> *    <a class="link" href="gio-GSocketConnectable.html#g-socket-address-enumerator-next" title="g_socket_address_enumerator_next ()">g_socket_address_enumerator_next</a>    (<em class="parameter"><code><a class="link" href="gio-GSocketConnectable.html#GSocketAddressEnumerator" title="GSocketAddressEnumerator"><span class="type">GSocketAddressEnumerator</span></a> *enumerator</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GCancellable.html#GCancellable" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gio-GSocketConnectable.html#g-socket-address-enumerator-next-async" title="g_socket_address_enumerator_next_async ()">g_socket_address_enumerator_next_async</a>
                                                        (<em class="parameter"><code><a class="link" href="gio-GSocketConnectable.html#GSocketAddressEnumerator" title="GSocketAddressEnumerator"><span class="type">GSocketAddressEnumerator</span></a> *enumerator</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GCancellable.html#GCancellable" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
<a class="link" href="gio-GSocketAddress.html#GSocketAddress" title="GSocketAddress"><span class="returnvalue">GSocketAddress</span></a> *    <a class="link" href="gio-GSocketConnectable.html#g-socket-address-enumerator-next-finish" title="g_socket_address_enumerator_next_finish ()">g_socket_address_enumerator_next_finish</a>
                                                        (<em class="parameter"><code><a class="link" href="gio-GSocketConnectable.html#GSocketAddressEnumerator" title="GSocketAddressEnumerator"><span class="type">GSocketAddressEnumerator</span></a> *enumerator</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GAsyncResult.html#GAsyncResult" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *result</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);

                    <a class="link" href="gio-GSocketConnectable.html#GProxyAddressEnumerator" title="GProxyAddressEnumerator">GProxyAddressEnumerator</a>;
</pre>
</div>
<div class="refsect1">
<a name="gio-GSocketConnectable.description"></a><h2>Description</h2>
<p>
Objects that describe one or more potential socket endpoints
implement <a class="link" href="gio-GSocketConnectable.html#GSocketConnectable" title="GSocketConnectable"><span class="type">GSocketConnectable</span></a>. Callers can then use
<a class="link" href="gio-GSocketConnectable.html#g-socket-connectable-enumerate" title="g_socket_connectable_enumerate ()"><code class="function">g_socket_connectable_enumerate()</code></a> to get a <a class="link" href="gio-GSocketConnectable.html#GSocketAddressEnumerator" title="GSocketAddressEnumerator"><span class="type">GSocketAddressEnumerator</span></a>
to try out each socket address in turn until one succeeds, as shown
in the sample code below.
</p>
<p>
</p>
<div class="informalexample"><pre class="programlisting">
MyConnectionType *
connect_to_host (const char    *hostname,
                 guint16        port,
                 GCancellable  *cancellable,
                 GError       **error)
{
  MyConnection *conn = NULL;
  GSocketConnectable *addr;
  GSocketAddressEnumerator *enumerator;
  GSocketAddress *sockaddr;
  GError *conn_error = NULL;

  addr = g_network_address_new ("www.gnome.org", 80);
  enumerator = g_socket_connectable_enumerate (addr);
  g_object_unref (addr);

  /* Try each sockaddr until we succeed. Record the first
   * connection error, but not any further ones (since they'll probably
   * be basically the same as the first).
   */
  while (!conn &amp;&amp; (sockaddr = g_socket_address_enumerator_next (enumerator, cancellable, error))
    {
      conn = connect_to_sockaddr (sockaddr, conn_error ? NULL : &amp;conn_error);
      g_object_unref (sockaddr);
    }
  g_object_unref (enumerator);

  if (conn)
    {
      if (conn_error)
        {
          /* We couldn't connect to the first address, but we succeeded
           * in connecting to a later address.
           */
          g_error_free (conn_error);
        }
      return conn;
    }
  else if (error)
    {
      /* Either the initial lookup failed, or else the caller
       * cancelled us.
       */
      if (conn_error)
        g_error_free (conn_error);
      return NULL;
    }
  else
    {
      g_error_propagate (error, conn_error);
      return NULL;
    }
}
</pre></div>
<p>
</p>
</div>
<div class="refsect1">
<a name="gio-GSocketConnectable.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GSocketConnectable"></a><h3>GSocketConnectable</h3>
<pre class="programlisting">typedef struct _GSocketConnectable GSocketConnectable;</pre>
<p>
Interface for objects that contain or generate <a class="link" href="gio-GSocketAddress.html#GSocketAddress" title="GSocketAddress"><span class="type">GSocketAddress</span></a>es.
</p>
</div>
<hr>
<div class="refsect2">
<a name="GSocketConnectableIface"></a><h3>struct GSocketConnectableIface</h3>
<pre class="programlisting">struct GSocketConnectableIface {
  GTypeInterface g_iface;

  /* Virtual Table */

  GSocketAddressEnumerator * (* enumerate)       (GSocketConnectable *connectable);

  GSocketAddressEnumerator * (* proxy_enumerate) (GSocketConnectable *connectable);
};
</pre>
<p>
Provides an interface for returning a <a class="link" href="gio-GSocketConnectable.html#GSocketAddressEnumerator" title="GSocketAddressEnumerator"><span class="type">GSocketAddressEnumerator</span></a>
and <a class="link" href="gio-GSocketConnectable.html#GProxyAddressEnumerator" title="GProxyAddressEnumerator"><span class="type">GProxyAddressEnumerator</span></a>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a href="../gobject/gobject-Type-Information.html#GTypeInterface"><span class="type">GTypeInterface</span></a> <em class="structfield"><code><a name="GSocketConnectableIface.g-iface"></a>g_iface</code></em>;</span></p></td>
<td>The parent interface.</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GSocketConnectableIface.enumerate"></a>enumerate</code></em> ()</span></p></td>
<td>Creates a <a class="link" href="gio-GSocketConnectable.html#GSocketAddressEnumerator" title="GSocketAddressEnumerator"><span class="type">GSocketAddressEnumerator</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GSocketConnectableIface.proxy-enumerate"></a>proxy_enumerate</code></em> ()</span></p></td>
<td>Creates a <a class="link" href="gio-GSocketConnectable.html#GProxyAddressEnumerator" title="GProxyAddressEnumerator"><span class="type">GProxyAddressEnumerator</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-socket-connectable-enumerate"></a><h3>g_socket_connectable_enumerate ()</h3>
<pre class="programlisting"><a class="link" href="gio-GSocketConnectable.html#GSocketAddressEnumerator" title="GSocketAddressEnumerator"><span class="returnvalue">GSocketAddressEnumerator</span></a> * g_socket_connectable_enumerate
                                                        (<em class="parameter"><code><a class="link" href="gio-GSocketConnectable.html#GSocketConnectable" title="GSocketConnectable"><span class="type">GSocketConnectable</span></a> *connectable</code></em>);</pre>
<p>
Creates a <a class="link" href="gio-GSocketConnectable.html#GSocketAddressEnumerator" title="GSocketAddressEnumerator"><span class="type">GSocketAddressEnumerator</span></a> for <em class="parameter"><code>connectable</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connectable</code></em> :</span></p></td>
<td>a <a class="link" href="gio-GSocketConnectable.html#GSocketConnectable" title="GSocketConnectable"><span class="type">GSocketConnectable</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="gio-GSocketConnectable.html#GSocketAddressEnumerator" title="GSocketAddressEnumerator"><span class="type">GSocketAddressEnumerator</span></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.22</p>
</div>
<hr>
<div class="refsect2">
<a name="g-socket-connectable-proxy-enumerate"></a><h3>g_socket_connectable_proxy_enumerate ()</h3>
<pre class="programlisting"><a class="link" href="gio-GSocketConnectable.html#GSocketAddressEnumerator" title="GSocketAddressEnumerator"><span class="returnvalue">GSocketAddressEnumerator</span></a> * g_socket_connectable_proxy_enumerate
                                                        (<em class="parameter"><code><a class="link" href="gio-GSocketConnectable.html#GSocketConnectable" title="GSocketConnectable"><span class="type">GSocketConnectable</span></a> *connectable</code></em>);</pre>
<p>
Creates a <a class="link" href="gio-GSocketConnectable.html#GSocketAddressEnumerator" title="GSocketAddressEnumerator"><span class="type">GSocketAddressEnumerator</span></a> for <em class="parameter"><code>connectable</code></em> that will
return <a class="link" href="gio-GProxyAddress.html#GProxyAddress" title="GProxyAddress"><span class="type">GProxyAddress</span></a>es for addresses that you must connect
to via a proxy.
</p>
<p>
If <em class="parameter"><code>connectable</code></em> does not implement
<a class="link" href="gio-GSocketConnectable.html#g-socket-connectable-proxy-enumerate" title="g_socket_connectable_proxy_enumerate ()"><code class="function">g_socket_connectable_proxy_enumerate()</code></a>, this will fall back to
calling <a class="link" href="gio-GSocketConnectable.html#g-socket-connectable-enumerate" title="g_socket_connectable_enumerate ()"><code class="function">g_socket_connectable_enumerate()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connectable</code></em> :</span></p></td>
<td>a <a class="link" href="gio-GSocketConnectable.html#GSocketConnectable" title="GSocketConnectable"><span class="type">GSocketConnectable</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="gio-GSocketConnectable.html#GSocketAddressEnumerator" title="GSocketAddressEnumerator"><span class="type">GSocketAddressEnumerator</span></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="GSocketAddressEnumerator"></a><h3>GSocketAddressEnumerator</h3>
<pre class="programlisting">typedef struct {
  GObject parent_instance;
} GSocketAddressEnumerator;
</pre>
<p>
Enumerator type for objects that contain or generate
<a class="link" href="gio-GSocketAddress.html#GSocketAddress" title="GSocketAddress"><span class="type">GSocketAddress</span></a>es.
</p>
</div>
<hr>
<div class="refsect2">
<a name="g-socket-address-enumerator-next"></a><h3>g_socket_address_enumerator_next ()</h3>
<pre class="programlisting"><a class="link" href="gio-GSocketAddress.html#GSocketAddress" title="GSocketAddress"><span class="returnvalue">GSocketAddress</span></a> *    g_socket_address_enumerator_next    (<em class="parameter"><code><a class="link" href="gio-GSocketConnectable.html#GSocketAddressEnumerator" title="GSocketAddressEnumerator"><span class="type">GSocketAddressEnumerator</span></a> *enumerator</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GCancellable.html#GCancellable" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Retrieves the next <a class="link" href="gio-GSocketAddress.html#GSocketAddress" title="GSocketAddress"><span class="type">GSocketAddress</span></a> from <em class="parameter"><code>enumerator</code></em>. Note that this
may block for some amount of time. (Eg, a <a class="link" href="gio-GNetworkAddress.html#GNetworkAddress" title="GNetworkAddress"><span class="type">GNetworkAddress</span></a> may need
to do a DNS lookup before it can return an address.) Use
<a class="link" href="gio-GSocketConnectable.html#g-socket-address-enumerator-next-async" title="g_socket_address_enumerator_next_async ()"><code class="function">g_socket_address_enumerator_next_async()</code></a> if you need to avoid
blocking.
</p>
<p>
If <em class="parameter"><code>enumerator</code></em> is expected to yield addresses, but for some reason
is unable to (eg, because of a DNS error), then the first call to
<a class="link" href="gio-GSocketConnectable.html#g-socket-address-enumerator-next" title="g_socket_address_enumerator_next ()"><code class="function">g_socket_address_enumerator_next()</code></a> will return an appropriate error
in *<em class="parameter"><code>error</code></em>. However, if the first call to
<a class="link" href="gio-GSocketConnectable.html#g-socket-address-enumerator-next" title="g_socket_address_enumerator_next ()"><code class="function">g_socket_address_enumerator_next()</code></a> succeeds, then any further
internal errors (other than <em class="parameter"><code>cancellable</code></em> being triggered) will be
ignored.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>enumerator</code></em> :</span></p></td>
<td>a <a class="link" href="gio-GSocketConnectable.html#GSocketAddressEnumerator" title="GSocketAddressEnumerator"><span class="type">GSocketAddressEnumerator</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
<td>optional <a class="link" href="gio-GCancellable.html#GCancellable" title="GCancellable"><span class="type">GCancellable</span></a> object, <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>a <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <a class="link" href="gio-GSocketAddress.html#GSocketAddress" title="GSocketAddress"><span class="type">GSocketAddress</span></a> (owned by the caller), or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on
error (in which case *<em class="parameter"><code>error</code></em> will be set) or if there are no
more addresses. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-socket-address-enumerator-next-async"></a><h3>g_socket_address_enumerator_next_async ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_socket_address_enumerator_next_async
                                                        (<em class="parameter"><code><a class="link" href="gio-GSocketConnectable.html#GSocketAddressEnumerator" title="GSocketAddressEnumerator"><span class="type">GSocketAddressEnumerator</span></a> *enumerator</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GCancellable.html#GCancellable" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>
Asynchronously retrieves the next <a class="link" href="gio-GSocketAddress.html#GSocketAddress" title="GSocketAddress"><span class="type">GSocketAddress</span></a> from <em class="parameter"><code>enumerator</code></em>
and then calls <em class="parameter"><code>callback</code></em>, which must call
<a class="link" href="gio-GSocketConnectable.html#g-socket-address-enumerator-next-finish" title="g_socket_address_enumerator_next_finish ()"><code class="function">g_socket_address_enumerator_next_finish()</code></a> to get the result.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>enumerator</code></em> :</span></p></td>
<td>a <a class="link" href="gio-GSocketConnectable.html#GSocketAddressEnumerator" title="GSocketAddressEnumerator"><span class="type">GSocketAddressEnumerator</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
<td>optional <a class="link" href="gio-GCancellable.html#GCancellable" title="GCancellable"><span class="type">GCancellable</span></a> object, <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
<td>a <a class="link" href="gio-GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call when the request
is satisfied. <span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>the data to pass to callback function. <span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-socket-address-enumerator-next-finish"></a><h3>g_socket_address_enumerator_next_finish ()</h3>
<pre class="programlisting"><a class="link" href="gio-GSocketAddress.html#GSocketAddress" title="GSocketAddress"><span class="returnvalue">GSocketAddress</span></a> *    g_socket_address_enumerator_next_finish
                                                        (<em class="parameter"><code><a class="link" href="gio-GSocketConnectable.html#GSocketAddressEnumerator" title="GSocketAddressEnumerator"><span class="type">GSocketAddressEnumerator</span></a> *enumerator</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GAsyncResult.html#GAsyncResult" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *result</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Retrieves the result of a completed call to
<a class="link" href="gio-GSocketConnectable.html#g-socket-address-enumerator-next-async" title="g_socket_address_enumerator_next_async ()"><code class="function">g_socket_address_enumerator_next_async()</code></a>. See
<a class="link" href="gio-GSocketConnectable.html#g-socket-address-enumerator-next" title="g_socket_address_enumerator_next ()"><code class="function">g_socket_address_enumerator_next()</code></a> for more information about
error handling.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>enumerator</code></em> :</span></p></td>
<td>a <a class="link" href="gio-GSocketConnectable.html#GSocketAddressEnumerator" title="GSocketAddressEnumerator"><span class="type">GSocketAddressEnumerator</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
<td>a <a class="link" href="gio-GAsyncResult.html#GAsyncResult" title="GAsyncResult"><span class="type">GAsyncResult</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>a <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <a class="link" href="gio-GSocketAddress.html#GSocketAddress" title="GSocketAddress"><span class="type">GSocketAddress</span></a> (owned by the caller), or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on
error (in which case *<em class="parameter"><code>error</code></em> will be set) or if there are no
more addresses. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GProxyAddressEnumerator"></a><h3>GProxyAddressEnumerator</h3>
<pre class="programlisting">typedef struct {
  GSocketAddressEnumerator parent_instance;
  GProxyAddressEnumeratorPrivate *priv;
} GProxyAddressEnumerator;
</pre>
<p>
A subclass of <a class="link" href="gio-GSocketConnectable.html#GSocketAddressEnumerator" title="GSocketAddressEnumerator"><span class="type">GSocketAddressEnumerator</span></a> that takes another address
enumerator and wraps its results in <a class="link" href="gio-GProxyAddress.html#GProxyAddress" title="GProxyAddress"><span class="type">GProxyAddress</span></a>es as
directed by the default <a class="link" href="gio-GProxyResolver.html#GProxyResolver" title="GProxyResolver"><span class="type">GProxyResolver</span></a>.
</p>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.17</div>
</body>
</html>